Set Limit
Set applicable volume and transaction limits for physical and virtual cards.
Card type | Attribute | Applicable limits |
---|---|---|
Virtual card | Volume | PER_TRANSACTION, DAY, MONTH, YEAR, LIFE_TIME |
Virtual card | Transaction count | DAY, MONTH, YEAR, LIFE_TIME |
Physical card | Volume | PER_TRANSACTION |
Physical card | Transaction count | DAY, MONTH, YEAR |
Method: POST
{{URL}}/cardv2
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
- cURL
- C#
- Go
- NodeJs
curl --location --globoff '{{URL}}/cardv2' \
--header 'Content-Type: application/json' \
--data '{"method":"ledger.CARD.request","id":"1","params":{"payload":{"reference":"visadps100026","transactionType":"SET_LIMIT","customerId":"100000000006001","accountNumber":"400320588344662","product":"DEFAULT","channel":"VISA_DPS","program":"DEFAULT","cardLimit":{"cardId":"ff32c9ded3774e109e002773e8822a0b","cycleType":"LIFE_TIME","type":"VOLUME","value":"1000"}},"api":{"credential":"{{cred}}","signature":"{{signature}}","apiKey":"{{Api-key}}"}}}'
var options = new RestClientOptions("{{URL}}/cardv2")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""method"": ""ledger.CARD.request"",
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""reference"": ""visadps100026"",
" + "\n" +
@" ""transactionType"": ""SET_LIMIT"",
" + "\n" +
@" ""customerId"": ""100000000006001"",
" + "\n" +
@" ""accountNumber"": ""400320588344662"",
" + "\n" +
@" ""product"": ""DEFAULT"",
" + "\n" +
@" ""channel"": ""VISA_DPS"",
" + "\n" +
@" ""program"": ""DEFAULT"",
" + "\n" +
@" ""cardLimit"": {
" + "\n" +
@" ""cardId"": ""ff32c9ded3774e109e002773e8822a0b"",
" + "\n" +
@" ""cycleType"": ""LIFE_TIME"",
" + "\n" +
@" ""type"": ""VOLUME"",
" + "\n" +
@" ""value"": ""1000""
" + "\n" +
@" }
" + "\n" +
@" },
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""credential"": ""{{cred}}"",
" + "\n" +
@" ""signature"": ""{{signature}}"",
" + "\n" +
@" ""apiKey"": ""{{Api-key}}""
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{URL}}/cardv2"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"method": "ledger.CARD.request",`+"
"+`
"id": "1",`+"
"+`
"params": {`+"
"+`
"payload": {`+"
"+`
"reference": "visadps100026",`+"
"+`
"transactionType": "SET_LIMIT",`+"
"+`
"customerId": "100000000006001",`+"
"+`
"accountNumber": "400320588344662",`+"
"+`
"product": "DEFAULT",`+"
"+`
"channel": "VISA_DPS",`+"
"+`
"program": "DEFAULT",`+"
"+`
"cardLimit": {`+"
"+`
"cardId": "ff32c9ded3774e109e002773e8822a0b",`+"
"+`
"cycleType": "LIFE_TIME",`+"
"+`
"type": "VOLUME",`+"
"+`
"value": "1000"`+"
"+`
}`+"
"+`
},`+"
"+`
"api": {`+"
"+`
"credential": "{{cred}}",`+"
"+`
"signature": "{{signature}}",`+"
"+`
"apiKey": "{{Api-key}}"`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{URL}}',
'path': '/cardv2',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"method": "ledger.CARD.request",
"id": "1",
"params": {
"payload": {
"reference": "visadps100026",
"transactionType": "SET_LIMIT",
"customerId": "100000000006001",
"accountNumber": "400320588344662",
"product": "DEFAULT",
"channel": "VISA_DPS",
"program": "DEFAULT",
"cardLimit": {
"cardId": "ff32c9ded3774e109e002773e8822a0b",
"cycleType": "LIFE_TIME",
"type": "VOLUME",
"value": "1000"
}
},
"api": {
"credential": "{{cred}}",
"signature": "{{signature}}",
"apiKey": "{{Api-key}}"
}
}
});
req.write(postData);
req.end();
Body
{
"method": "ledger.CARD.request",
"id": "1",
"params": {
"payload": {
"reference": "visadps100026",
"transactionType": "SET_LIMIT",
"customerId": "100000000006001",
"accountNumber": "400320588344662",
"product": "DEFAULT",
"channel": "VISA_DPS",
"program": "DEFAULT",
"cardLimit": {
"cardId": "ff32c9ded3774e109e002773e8822a0b",
"cycleType": "LIFE_TIME",
"type": "VOLUME",
"value": "1000"
}
},
"api": {
"credential": "{{cred}}",
"signature": "{{signature}}",
"apiKey": "{{Api-key}}"
}
}
}
Response: 200
Response Parameters
{
"id": "1",
"result": {
"api": {
"type": "SET_LIMIT_ACK",
"reference": "REFvisadps100026",
"dateCreated": 1732088991,
"originalReference": "visadps100026"
}
}
}